import { orgApis } from '../../src/api/vesalesapi'
// 订单开票查询
const orderdata = {
  'orderdata': {
    'orderCode|+1': 1,
    orgcode: '@increment(1)',
    isVAT: '@time("HH:mm:ss")',
    ERPjl: '@ctitle()',
    ERPcz: '@cparagraph()',
    orgName: '深圳联友', //	厂商名称
    orgCode: '@date("yyyy-MM-dd")', //	厂商编码
    orgId: '@ctitle', //	厂商ID
    url1: '@url("https")',
    url2: '@url("https")',
    url3: '@url("https")',
    pName: '@cname', //	管理员角色
    userName: '@integer(15,22)万', //	管理员账号
    password: '@province', //	管理员密码
    roleId: '@city', //	角色ID
    'isEnable|1': ['1', '0'], //	状态
    column1: '@region', //	备注
    isInvoice: '@guid()',
    orgNameTwo: '@area' // 供应商全称
  },
  'collection': {
    'DMScode|1': ['DMS31299', 'DMS90709'],
    VINcode: '@string(12)',
    'orderCode|1': ['定金已支付', '退订申请', '退订审核通过', '车辆退订入库', '退订退款完成', '订单已分配', '合同已签署', '订单已配车', '订单未配车', '已插单', '车辆已发车', '车辆验收入库', '尾款已支付', '车辆销售出库', '订单开票申请', '开票审核通过', '订单已开票', '订单已支付', '销退申请', '销退审核通过', '车辆销退入库', '销退退款完成', '订单已关闭'],
    batchnum: '@string(12)',
    'VATstatus|1': ['已申请', '未申请'],
    'EPRstatus|1': ['未发送', '记账成功'],
    'EPRjzstatus|1': ['未发送', '已发送'],
    'isStrike|1': ['冲账', '不充账'],
    payname: '@cname',
    'storeId|1': ['1门店', '2号门店'],
    peopleId: '@cname()',
    carnumber: '420500199919191919',
    customername: '@cname()',
    'contactnum|0-9': '1',
    'orderstatus|1': ['已开票', '未开票'],
    'ordertype|1': ['类型1', '类型2'],
    'configuration|1': ['配置1', '配置2', '配置3'],
    'carsname|1': ['岚图N1', '东风S1'],
    billcode: '@string(12)',
    collectionnum: '43249234838',
    paytime: '@date("yyyy-MM-dd")',
    payouttime: '@date("yyyy-MM-dd")',
    payintime: '@date("yyyy-MM-dd")',
    confirmtime: '@date("yyyy-MM-dd")',
    collection: '200000',
    priceall: '300000',
    shouldpay: '300000',
    'project|1': ['小订', '大订', '尾款'],
    'paystyle|1': ['pos支付', '转账支付'],
    'bank|1': ['建行', '工行', '农行'],
    banknumber: '43249234838',
    note: '@cparagraph(15)'
  },
  'orderdetail': {
    cangku: '',
    'allotstatus|1': ['已分配', '未分配'],
    'DMScode|1': ['DMS31299', 'DMS90709'],
    Ccode: '@string(12)',
    'orderCode|1': ['定金已支付', '退订申请', '退订审核通过', '车辆退订入库', '退订退款完成', '订单已分配', '合同已签署', '订单已配车', '订单未配车', '已插单', '订单已发运', '车辆已发车', '车辆验收入库', '尾款已支付', '车辆销售出库', '订单开票申请', '开票审核通过', '订单已开票', '订单已支付', '销退申请', '销退审核通过', '车辆销退入库', '销退退款完成', '订单已关闭'],
    'ordersource|1': ['官网', '门店', '总部'],
    'orderlabel|1': ['普通客户订单', '会员客户订单', '内部订单'],
    Amount: '200000',
    priceall: '300000',
    plancode: '@string(12)',
    VINcode: '@string(12)',
    'carstatus|1': ['正常', '维修', '报废'],
    customername: '@cname()',
    'customergender|1': ['男', '女'],
    'customernum|0-9': '1',
    'documenttype|1': ['身份证'],
    carnumber: '420500199919191919',
    contactname: '@cname()',
    'contactnum|0-9': '1',
    'baystyle|1': ['全款', '金融贷款'],
    'useful|1': ['私用', '公共'],
    'bayform|1': ['首购', '加购'],
    orderdate: '@date("yyyy-MM-dd")',
    salepeople: '@cname()',
    'salepeoplenum|0-9': '1',
    expectdate: '@date("yyyy-MM-dd")',
    cityId: '@city',
    'storeId|1': ['1门店', '2号门店'],
    'storetype|1': ['线下', '线上'],
    peopleId: '@cname()',
    shipmentdate: '@date("yyyy-MM-dd")', // 车辆发运日期
    deliverydate: '@date("yyyy-MM-dd")',
    'PDIstatus|1': ['未做PDI', '已做PDI'],
    PDIdate: '@date("yyyy-MM-dd")',
    unsubscribe: '无',
    note: '@cparagraph(15)',
    'brand|1': ['岚图', '东风'],
    'carscode|1': ['N1', 'S1'],
    'carsname|1': ['岚图N1', '东风S1'],
    basiccarcode: '@string(13)',
    'basiccarname|1': ['岚图N1', '东风S1'],
    packagecaode: '@string(5)',
    'packagename|1': ['时尚', '基础'],
    carcolorcode: '@string(3)',
    'carcolor|1': ['黑色', '蓝色', '白色'],
    innercolorcode: '@string(1)',
    'innercolor|1': ['黑色', '蓝色', '白色'],
    configurationcode: '@string(22)',
    'configuration|1': ['配置1', '配置2', '配置3'],
    'country|1': ['中国', '日本', '韩国'],
    origin: '湖北武汉',
    batterycode: '@string(12)',
    'drivingtype|1': ['4X4', '4X8', '8X8'],
    'drivetype|1': ['纯电', '增程'],
    rolleddate: '@date("yyyy-MM-dd")',
    productiondate: '@date("yyyy-MM-dd")',
    limittype: '@title(5)',
    warehouse: '武汉仓库',
    carconfigdate: '@date("yyyy-MM-dd")',
    contractcode: '@string(12)',
    contractdate: '@date("yyyy-MM-dd")',
    'costumertype|1': ['普通客户', '会员客户', '钻石客户'],
    companyname: '深圳联友',
    SCcode: '342342375907345989233'
  },
  'activity': {
    'equitiestype|1': ['折扣类', '精品类'],
    'discounttype|1': ['优惠券', '无'],
    'addtype|1': ['固化', '可选'],
    equitiesname: '@cparagraph(5)',
    equitiesdetail: '@cparagraph(5)',
    equitiesval: '20000元',
    'equities|1': ['优惠券', '翻倍'],
    activitydetail: '@cparagraph(5)',
    begintime: '@date("yyyy-MM-dd")',
    enddingtime: '@date("yyyy-MM-dd")'
  },
  'orderbill': {
    'project|1': ['小订', '大订', '尾款'],
    receivable: '2000',
    paidin: '2000',
    'paytype|1': ['pos', '转账', '支付宝'],
    paytime: '@date("yyyy-MM-dd")',
    payintime: '@date("yyyy-MM-dd")',
    billcode: '@string(12)',
    'bank|1': ['建行', '工行', '农行'],
    banknumber: '43249234838',
    payname: '@cname'
  },
  'veDeliveryplaceManage': {
    'changeordercode|1': ['JFD20201101001', 'JFD20201102002', 'JFD253453453455'],
    'status|1': ['门店审核通过', '门店驳回', '总部审核通过', '总部审核驳回', '未审核'],
    rejectdate: '@date("yyyy-MM-dd")',
    'rejectwhy|1': ['变更地无库存', '订单不允许变更', '其他原因'],
    applydate: '@date("yyyy-MM-dd")',
    applypeople: '@cname',
    'changewhy|1': ['客户要求', '门店要求', '其他原因'],
    originalplace: '@city',
    changeplace: '@city',
    'relevancyordercode|1': ['376615249', '314507228', '389904251'],
    'configuration|1': ['配置1', '配置2', '配置3'],
    'expectstorecode|1': ['4234234', '534534', '756756'],
    'expectstore|1': ['1门店', '2号门店']
  },
  'deliveryCity': [
    {
      cityName: '@city',
      cityCode: '1',
      cityId: '1',
      orderNo: 1
    },
    {
      cityName: '@city',
      cityCode: '2',
      cityId: '2',
      orderNo: 2
    },
    {
      cityName: '@city',
      cityCode: '3',
      cityId: '3',
      orderNo: 3
    }
  ],
  'deliveryStore': [
    {
      storeName: '@county(true)',
      storeCode: '1',
      storeId: '1',
      orderNo: 1
    },
    {
      storeName: '@county(true)',
      storeCode: '2',
      storeId: '2',
      orderNo: 2
    },
    {
      storeName: '@county(true)',
      storeCode: '3',
      storeId: '3',
      orderNo: 3
    }
  ],
  'deliveryPeople': [
    {
      peopleName: '@cname',
      peopleCode: '1',
      peopleId: '1',
      orderNo: 1
    },
    {
      peopleName: '@cname',
      peopleCode: '2',
      peopleId: '2',
      orderNo: 2
    },
    {
      peopleName: '@cname',
      peopleCode: '3',
      peopleId: '3',
      orderNo: 3
    }
  ]
}

export default [
  // { // 交付专员查询
  //   url: orgApis.deliveryPeoplequery.APIUrl,
  //   type: 'post',
  //   response: config => {
  //     var returnList = orderdata.deliveryPeople
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // },
  // { // 交付门店查询
  //   url: orgApis.deliveryStorequery.APIUrl,
  //   type: 'post',
  //   response: config => {
  //     var returnList = orderdata.deliveryStore
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // },
  // { // 交付城市查询
  //   url: orgApis.deliveryCityquery.APIUrl,
  //   type: 'post',
  //   response: config => {
  //     var returnList = orderdata.deliveryCity
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // },
  //   { // 交付地变更审核
  //     url: orgApis.detailsquery4.APIUrl,
  //     type: 'post',
  //     response: config => {
  //       const { pageSize } = config.body
  //       var returnList = Array(pageSize).fill(orderdata.veDeliveryplaceManage)
  //       const minIndex = (config.body.pageIndex - 1) * config.body.pageSize
  //       // 分页过滤
  //       returnList.forEach((item, index) => {
  //         item['index'] = index + minIndex
  //       })
  //       const maxIndex = minIndex + config.body.pageSize
  //       returnList = returnList.filter(o => o.index >= minIndex && o.index < maxIndex)
  //       return {
  //         'msg': '',
  //         'result': '1',
  //         'rowcount': returnList.length,
  //         'rows': returnList

  //       }
  //     }
  //   }
  // { // 订单收款
  //   url: orgApis.orderCollectionQuery.APIUrl,
  //   type: 'post',
  //   response: config => {
  //     const { pageSize } = config.body
  //     var returnList = Array(pageSize).fill(orderdata.collection)
  //     const minIndex = (config.body.pageIndex - 1) * config.body.pageSize
  //     // 分页过滤
  //     returnList.forEach((item, index) => {
  //       item['index'] = index + minIndex
  //     })
  //     const maxIndex = minIndex + config.body.pageSize
  //     returnList = returnList.filter(o => o.index >= minIndex && o.index < maxIndex)
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // }
  // { // 活动权益
  //   url: orgApis.detailsquery1.APIUrl,
  //   type: 'post',
  //   response: config => {
  //     var returnList = Array(3).fill(orderdata.activity)
  //     const minIndex = (config.body.pageIndex - 1) * config.body.pageSize
  //     // 分页过滤
  //     returnList.forEach((item, index) => {
  //       item['index'] = index + minIndex
  //     })
  //     const maxIndex = minIndex + config.body.pageSize
  //     returnList = returnList.filter(o => o.index >= minIndex && o.index < maxIndex)
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // },
  // { // 订单开票查询
  //   url: '/ve/busicen/prc/basedata/carbrand/orderInvoice',
  //   type: 'post',
  //   response: config => {
  //     const { pageSize } = config.body
  //     var returnList = Array(pageSize).fill(orderdata.orderdetail)
  //     // 查询条件过滤
  //     // var params = config.body
  //     // if (params) {
  //     //   if (params.sdasdas !== '') {
  //     //     returnList = returnList.filter(o => o.sdasdas === params.sdasdas)
  //     //   }
  //     // }
  //     // 分页过滤
  //     const total = pageSize * (config.body.pageIndex - 1)
  //     returnList.forEach((item, index) => {
  //       item['index'] = index + total
  //     })
  //     const minIndex = (config.body.pageIndex - 1) * config.body.pageSize
  //     const maxIndex = minIndex + config.body.pageSize
  //     console.log(returnList[0].index, minIndex, maxIndex)
  //     returnList = returnList.filter(o => o.index >= minIndex && o.index < maxIndex)
  //     return {
  //       'msg': '',
  //       'result': '1',
  //       'rowcount': returnList.length,
  //       'rows': returnList

  //     }
  //   }
  // }
]
